LATEX=pdflatex
BIBTEX=bibtex
FILENAME=main

FINALNAME=main

all: pdf

pdf: src/$(FILENAME).bib src/$(FILENAME).tex
	cd src && \
	$(LATEX) $(FILENAME).tex && \
	$(BIBTEX) $(FILENAME) && \
	$(LATEX) $(FILENAME).tex  && \
	$(LATEX) $(FILENAME).tex
	mv src/$(FILENAME).pdf ./$(FINALNAME).pdf

clean-mess:
	rm -f src/*.{aux,bbl,blg,log}

clean:
	rm -f src/*.{aux,bbl,blg,log,pdf,ps,dvi} *.{pdf,ps,dvi}
